package com.qiaoyanqing.textdemoqyq7.Adapters;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;

import java.util.List;

/**
 * Created by Administrator on 2016/11/14.
 */

public class MainAdapter extends FragmentStatePagerAdapter {

 private List<Fragment>mList;
    public MainAdapter(FragmentManager fm,List<Fragment>mList) {
        super(fm);
        this.mList=mList;
    }

    @Override
    public Fragment getItem(int position) {
        return mList.get(position);
    }

    @Override
    public int getCount() {
        return mList.size();
    }
}
